home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_01_06 / 1n06040a < prev    next >
Text File  |  1990-10-01  |  205b  |  19 lines

  1.  
  2. Listing 6
  3.  
  4. int yylex(void)
  5.     {
  6.     int c;
  7.  
  8.     while (isspace(c = getchar()) && c != '\n')
  9.         ;
  10.     if (isdigit(c))
  11.         {
  12.         ungetc(c, stdin);
  13.         scanf("%d", &yylval);
  14.         return INT;
  15.         }
  16.     return c;
  17.     }
  18.  
  19.